package share

import (
	"github.com/hwcer/cosgo"
	"github.com/hwcer/cosgo/times"
	"github.com/hwcer/logger"
	"github.com/hwcer/yyds/options"
)

/*

所有服务器都应该加载这个模块进行全局配置

*/

// TimeReset 每日凌晨6点切换日期
const TimeReset = 5 * 3600

func init() {
	times.SetTimeReset(TimeReset)
	options.OAuth.SetMaster(options.ServiceTypeGame, "debug")

	cosgo.On(cosgo.EventTypStarted, func() error {
		logger.Console.Disable = true
		return nil
	})
	cosgo.On(cosgo.EventTypClosing, func() error {
		logger.Console.Disable = false
		return nil
	})
}

var Loading bool
